package com.kingdee.eas.custom.common;

import com.kingdee.bos.ctrl.kdf.util.render.ObjectValueRender;
import com.kingdee.eas.basedata.org.AdminOrgUnitInfo;
import com.kingdee.util.StringUtils;

public class OrgShortNameRender extends ObjectValueRender {

	public String getText(Object object) {
		String str = null;
		if ((object instanceof AdminOrgUnitInfo)) {
			AdminOrgUnitInfo orgUnitInfo = (AdminOrgUnitInfo) object;
			if (!StringUtils.isEmpty(orgUnitInfo.getName()))
				str = orgUnitInfo.getName();
			else
				str = orgUnitInfo.toString();
		} else if (object != null) {
			str = object.toString();
		}
		return str;
	}
}
